﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/CommonPages/MasterPageBackEnd.master" AutoEventWireup="true" CodeFile="StaffHome.aspx.cs" Inherits="ManagerViewStaff" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="block">
        <h2>Pesonal Info</h2>
        <ul>
            <li onclick="displayBlockStaff('StaffChangePass')"><i class="fa fa-angle-right"></i>Change Password</li>
            <li onclick="displayBlockStaff('StaffUpdateInfo')"><i class="fa fa-angle-right"></i>Update Info</li>
        </ul>
    </div>
    <div class="block">
        <h2>PAGE</h2>

        <ul id="content-box-tabs">
            <li><i class="fa fa-angle-right"></i>Students
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStaff('StaffViewStudent')"><i class="fa fa-angle-right"></i>View students</li>
                                    </ul>
            </li>
            <li><i class="fa fa-angle-right"></i>Competition
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStaff('StaffViewCompetition')"><i class="fa fa-angle-right"></i>View update competition</li>
                                        <li onclick="displayBlockStaff('StaffViewAllCompetition')"><i class="fa fa-angle-right"></i>View all competition</li>
                                    </ul>
            </li>
        </ul>
    </div>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <div id="StaffChangePass">
        <div class="updateStudent">
            <h4>Change Password
            </h4>
            <asp:Label ID="lblWarningChangePass" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" Font-Strikeout="False" Font-Underline="False" ForeColor="Red"></asp:Label>
            <table class="addTable">
                <tr>
                    <td>
                        <asp:Label ID="lblCurrentPass" runat="server" Text="Current Password :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtCurrentPass" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblNewPass" runat="server" Text="New Password :"></asp:Label>

                    </td>
                    <td>
                        <asp:TextBox ID="txtNewPass" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblConfirmPass" runat="server" Text="Confirm Password :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtConfirmPass" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:Button ID="btnChangePass" runat="server" Text="Change Password"
                            ClientIDMode="Static" OnClick="btnChangePass_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div id="StaffUpdateInfo">
        <div class="updateStudent">
            <h4>Update Info</h4>
            <asp:Label ID="lblWarningUpdateInfo" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" ForeColor="Red"></asp:Label>
            <table class="addTable">
                <tr>
                    <td>
                        <asp:Label ID="lblFullNameUpdate" runat="server" Text="Full name :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtFullNameUpdate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblAddressUpdate" runat="server" Text="Address :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddressUpdate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblEmailUpdate" runat="server" Text="Email :"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtEmailUpdate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblPhoneUpdate" runat="server" Text="Phone :"></asp:Label>

                    </td>
                    <td>
                        <asp:TextBox ID="txtPhoneUpdate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblMajorUpdate" runat="server" Text="Major :"></asp:Label>

                    </td>
                    <td>
                        <asp:TextBox ID="txtMajorUpdate" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:Button ID="btnUpdate" runat="server" Text="Update"
                            ClientIDMode="Static" OnClick="btnUpdate_Click"/>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <!-- students -->
    <div id="StaffViewStudent">
        <h4>Students</h4>
        <asp:Label ID="Label1" runat="server" Text="Student Name: "></asp:Label>
        <asp:TextBox ID="txtSeachStudent"  runat="server"></asp:TextBox>
        <asp:Button ID="btnSeachStudent" runat="server" Text="Search" OnClick="btnSeachStudent_Click" />
        <asp:Button ID="btnDisplayAllStudent" runat="server"
            Text="Display All Student" OnClick="btnDisplayAllStudent_Click"/>
        <asp:GridView CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"
            ID="grvStudents" runat="server" AutoGenerateColumns="False"
            DataKeyNames="studentId" Width="670px" BackColor="White"
            ClientIDMode="Static" AllowPaging="True" AllowSorting="True" PageSize="3"
            BorderColor="Black" BorderStyle="Solid" ShowFooter="True"
            ShowHeaderWhenEmpty="True" OnPageIndexChanging="grvStudents_PageIndexChanging">
            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
            <Columns>
                <asp:BoundField DataField="userName" HeaderText="User Name" />
                <asp:BoundField DataField="fullName" HeaderText="Full Name" />
                <asp:BoundField DataField="address" HeaderText="Address" />
                <asp:BoundField DataField="email" HeaderText="Email" />
                <asp:BoundField DataField="phoneNo" HeaderText="Phone No" />
                <asp:BoundField DataField="major" HeaderText="Major" />
                <asp:BoundField DataField="class" HeaderText="Class" />
            </Columns>

            <PagerStyle CssClass="pgr"></PagerStyle>
        </asp:GridView>
    </div>

    <!-- competitions -->
    <!-- view competitions -->
    <div id="StaffViewCompetition">
        <h4>Competitions</h4>
        <asp:Label ID="Label2" runat="server" Text="Name of Competition: "></asp:Label>
        <asp:TextBox ID="txtSearchViewCompetition" runat="server"></asp:TextBox>
        <asp:Button ID="btnSearchViewCompetition" runat="server" Text="Search" OnClick="btnSearchViewCompetition_Click" />
        <asp:Button ID="btnViewAllCompetition" runat="server"
            Text="Display All Competition" OnClick="btnViewAllCompetition_Click"/>
        <asp:GridView CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"
            ID="grvViewCompetition" runat="server" AutoGenerateColumns="False"
            AutoGenerateDeleteButton="True"
            DataKeyNames="comId" Width="670px" BackColor="White"
            ClientIDMode="Static" AllowSorting="True" PageSize="3"
            BorderColor="Black" BorderStyle="Solid" ShowFooter="True"
            ShowHeaderWhenEmpty="True" OnRowDeleting="grvViewCompetition_RowDeleting" OnRowDataBound="grvViewCompetition_RowDataBound">
            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
            <Columns>
                <asp:BoundField DataField="comId" HeaderText="Id"></asp:BoundField>
                <asp:BoundField DataField="name" HeaderText="Name"></asp:BoundField>
                <asp:BoundField DataField="firstPrize" HeaderText="First Prize"></asp:BoundField>
                <asp:BoundField DataField="secondPrize" HeaderText="Second Prize" />
                <asp:BoundField DataField="thirdPrize" HeaderText="Third Prize" />
                <asp:BoundField DataField="postDate" HeaderText="Post Date"
                    DataFormatString="{0:d}"></asp:BoundField>
                <asp:BoundField DataField="startDate" HeaderText="Start Date"
                    DataFormatString="{0:d}"></asp:BoundField>
                <asp:BoundField DataField="endDate" HeaderText="End Date"
                    DataFormatString="{0:d}"></asp:BoundField>
                <asp:BoundField DataField="description" HeaderText="Description"></asp:BoundField>
                <asp:BoundField DataField="quotation" HeaderText="Quotation"></asp:BoundField>
            </Columns>

            <PagerStyle CssClass="pgr"></PagerStyle>
            <SelectedRowStyle BorderColor="#663300" ForeColor="#0066FF" />
        </asp:GridView>

    </div>
    <div id="StaffViewAllCompetition">
        <h4>Competition List</h4>
        <asp:Label ID="Label3" runat="server" Text="Name of Competition: "></asp:Label>
        <asp:TextBox ID="txtSeachCompetition" runat="server"></asp:TextBox>
        <asp:Button ID="btnSeachCompetition" runat="server" Text="Search" OnClick="btnSeachCompetition_Click" />
        <asp:Button ID="btnDisplayAllCompetition" runat="server"
            Text="Display All Competition" OnClick="btnDisplayAllCompetition_Click" />
        <asp:GridView ID="grvCompetition" runat="server" AutoGenerateColumns="False"
            AllowPaging="True" DataKeyNames="comId" AllowSorting="True"
            PageSize="3" ForeColor="#FF9933" CssClass="mGrid" PagerStyle-CssClass="pgr" OnRowDataBound="grvCompetition_RowDataBound">
            <Columns>
                <asp:BoundField DataField="comId" HeaderText="Id"></asp:BoundField>
                <asp:BoundField DataField="name" HeaderText="Name"></asp:BoundField>
                <asp:BoundField DataField="firstPrize" HeaderText="First Prize"></asp:BoundField>
                <asp:BoundField DataField="secondPrize" HeaderText="Second Prize" />
                <asp:BoundField DataField="thirdPrize" HeaderText="Third Prize" />
                <asp:BoundField DataField="postDate" HeaderText="Post Date"
                    DataFormatString="{0:d}"></asp:BoundField>
                <asp:BoundField DataField="startDate" HeaderText="Start Date"
                    DataFormatString="{0:d}"></asp:BoundField>
                <asp:BoundField DataField="endDate" HeaderText="End Date"
                    DataFormatString="{0:d}"></asp:BoundField>
                <asp:BoundField DataField="description" HeaderText="Description"></asp:BoundField>
                <asp:BoundField DataField="quotation" HeaderText="Quotation"></asp:BoundField>
            </Columns>
            <PagerStyle CssClass="pgr" />
        </asp:GridView>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

